student_grades = {202410139042:100}

def record_grade(student_id grade):
    """记录学生成绩：学号为键，成绩为值存入字典"""
    student_grades[student_id] = grade
    print(f"已记录 {student_id} 成绩：{grade}")

def query_grade(student_id):
    """查询学生成绩：根据学号返回成绩，无则提示"""
    return student_grades.get(student_id, "该学生成绩未记录")

# 功能测试
if __name__ == "__main__":
    record_grade("S001", 90)
    print(query_grade("S001"))  